package Resource;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class FileWriter_01 {

    public static void main(String[] args) throws IOException {
//        src\test1.txt
//        test.txt
        Writer fw = new FileWriter("E:\\JavaSE\\src\\test1.txt");
        //写一个字符
        fw.write('君');
        //写一个字符串
        fw.write("shuzijun");
        //写字符串一部分
        fw.write("abc1234",0,4);

        fw.close();
    }
}
